package main.controller;

import main.pojo.User;
import main.service.MainService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.ArrayList;

@RestController
@CrossOrigin
@RequestMapping(value = "", method = {RequestMethod.GET, RequestMethod.POST})
public class MainController {
    @Resource
    private MainService service;
    @GetMapping(value = "/")
    public ArrayList<User> index() {
        return service.index();
    }
}
